#include<string.h>
#include"mystdio.h"
#include<unistd.h>
const char *filename="./log.txt";
int main()
{
  _myFILE* fp=myfopen(filename,"w");
  if(fp==NULL)return 1;
  
  int cnt=5;
  char buffer[64];
  while(cnt)
  {
    //const char *s="hello myself stdio interface\n";
    snprintf(buffer,sizeof(buffer),"hello world! hello bit!%d",cnt--);

    my_fwrite(fp,buffer,strlen(buffer));
    DebugPrint(fp);
    sleep(2);
    //my_fflush(fp);
  }
  my_fclose(fp);
  return 0;
}
